home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / shellapi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  22.2 KB  |  673 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * shellapi.h -  SHELL.DLL functions, types, and definitions                   *
  4. *                                                                             *
  5. * Copyright (c) 1992-1997, Microsoft Corp.  All rights reserved               *
  6. *                                                                             *
  7. \*****************************************************************************/
  8.  
  9. #ifndef _INC_SHELLAPI
  10. #define _INC_SHELLAPI
  11. #pragma option push -b
  12.  
  13.  
  14. //
  15. // Define API decoration for direct importing of DLL references.
  16. //
  17. #ifndef WINSHELLAPI
  18. #if !defined(_SHELL32_)
  19. #define WINSHELLAPI       DECLSPEC_IMPORT
  20. #else
  21. #define WINSHELLAPI
  22. #endif
  23. #endif // WINSHELLAPI
  24.  
  25. #ifndef SHSTDAPI
  26. #if !defined(_SHELL32_)
  27. #define SHSTDAPI          EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
  28. #define SHSTDAPI_(type)   EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
  29. #else
  30. #define SHSTDAPI          STDAPI
  31. #define SHSTDAPI_(type)   STDAPI_(type)
  32. #endif
  33. #endif // SHSTDAPI
  34.  
  35. #ifndef SHDOCAPI
  36. #if !defined(_SHDOCVW_)
  37. #define SHDOCAPI          EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
  38. #define SHDOCAPI_(type)   EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
  39. #else
  40. #define SHDOCAPI          STDAPI
  41. #define SHDOCAPI_(type)   STDAPI_(type)
  42. #endif
  43. #endif // SHDOCAPI
  44.  
  45.  
  46. #include <pshpack1.h>
  47.  
  48. #ifdef __cplusplus
  49. extern "C" {            /* Assume C declarations for C++ */
  50. #endif  /* __cplusplus */
  51.  
  52.  
  53.  
  54. DECLARE_HANDLE(HDROP);
  55.  
  56. WINSHELLAPI UINT APIENTRY DragQueryFileA(HDROP,UINT,LPSTR,UINT);
  57. WINSHELLAPI UINT APIENTRY DragQueryFileW(HDROP,UINT,LPWSTR,UINT);
  58. #ifdef UNICODE
  59. #define DragQueryFile  DragQueryFileW
  60. #else
  61. #define DragQueryFile  DragQueryFileA
  62. #endif // !UNICODE
  63. WINSHELLAPI BOOL APIENTRY DragQueryPoint(HDROP,LPPOINT);
  64. WINSHELLAPI VOID APIENTRY DragFinish(HDROP);
  65. WINSHELLAPI VOID APIENTRY DragAcceptFiles(HWND,BOOL);
  66.  
  67. WINSHELLAPI HINSTANCE APIENTRY ShellExecuteA(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT nShowCmd);
  68. WINSHELLAPI HINSTANCE APIENTRY ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd);
  69. #ifdef UNICODE
  70. #define ShellExecute  ShellExecuteW
  71. #else
  72. #define ShellExecute  ShellExecuteA
  73. #endif // !UNICODE
  74. WINSHELLAPI HINSTANCE APIENTRY FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult);
  75. WINSHELLAPI HINSTANCE APIENTRY FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult);
  76. #ifdef UNICODE
  77. #define FindExecutable  FindExecutableW
  78. #else
  79. #define FindExecutable  FindExecutableA
  80. #endif // !UNICODE
  81. WINSHELLAPI LPWSTR *  APIENTRY CommandLineToArgvW(LPCWSTR lpCmdLine, int*pNumArgs);
  82.  
  83. WINSHELLAPI INT       APIENTRY ShellAboutA(HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon);
  84. WINSHELLAPI INT       APIENTRY ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon);
  85. #ifdef UNICODE
  86. #define ShellAbout  ShellAboutW
  87. #else
  88. #define ShellAbout  ShellAboutA
  89. #endif // !UNICODE
  90. WINSHELLAPI HICON     APIENTRY DuplicateIcon(HINSTANCE hInst, HICON hIcon);
  91. WINSHELLAPI HICON     APIENTRY ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIcon);
  92. WINSHELLAPI HICON     APIENTRY ExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIcon);
  93. #ifdef UNICODE
  94. #define ExtractAssociatedIcon  ExtractAssociatedIconW
  95. #else
  96. #define ExtractAssociatedIcon  ExtractAssociatedIconA
  97. #endif // !UNICODE
  98.  
  99. WINSHELLAPI HICON     APIENTRY ExtractIconA(HINSTANCE hInst, LPCSTR lpszExeFileName, UINT nIconIndex);
  100. WINSHELLAPI HICON     APIENTRY ExtractIconW(HINSTANCE hInst, LPCWSTR lpszExeFileName, UINT nIconIndex);
  101. #ifdef UNICODE
  102. #define ExtractIcon  ExtractIconW
  103. #else
  104. #define ExtractIcon  ExtractIconA
  105. #endif // !UNICODE
  106.  
  107. #if(WINVER >= 0x0400)
  108. typedef struct _DRAGINFOA {
  109.     UINT uSize;                 /* init with sizeof(DRAGINFO) */
  110.     POINT pt;
  111.     BOOL fNC;
  112.     LPSTR   lpFileList;
  113.     DWORD grfKeyState;
  114. } DRAGINFOA, FAR* LPDRAGINFOA;
  115. typedef struct _DRAGINFOW {
  116.     UINT uSize;                 /* init with sizeof(DRAGINFO) */
  117.     POINT pt;
  118.     BOOL fNC;
  119.     LPWSTR  lpFileList;
  120.     DWORD grfKeyState;
  121. } DRAGINFOW, FAR* LPDRAGINFOW;
  122. #ifdef UNICODE
  123. typedef DRAGINFOW DRAGINFO;
  124. typedef LPDRAGINFOW LPDRAGINFO;
  125. #else
  126. typedef DRAGINFOA DRAGINFO;
  127. typedef LPDRAGINFOA LPDRAGINFO;
  128. #endif // UNICODE
  129.  
  130.  
  131. ////
  132. //// AppBar stuff
  133. ////
  134. #define ABM_NEW           0x00000000
  135. #define ABM_REMOVE        0x00000001
  136. #define ABM_QUERYPOS      0x00000002
  137. #define ABM_SETPOS        0x00000003
  138. #define ABM_GETSTATE      0x00000004
  139. #define ABM_GETTASKBARPOS 0x00000005
  140. #define ABM_ACTIVATE      0x00000006  // lParam == TRUE/FALSE means activate/deactivate
  141. #define ABM_GETAUTOHIDEBAR 0x00000007
  142. #define ABM_SETAUTOHIDEBAR 0x00000008  // this can fail at any time.  MUST check the result
  143.                                         // lParam = TRUE/FALSE  Set/Unset
  144.                                         // uEdge = what edge
  145. #define ABM_WINDOWPOSCHANGED 0x0000009
  146.  
  147.  
  148. // these are put in the wparam of callback messages
  149. #define ABN_STATECHANGE    0x0000000
  150. #define ABN_POSCHANGED     0x0000001
  151. #define ABN_FULLSCREENAPP  0x0000002
  152. #define ABN_WINDOWARRANGE  0x0000003 // lParam == TRUE means hide
  153.  
  154. // flags for get state
  155. #define ABS_AUTOHIDE    0x0000001
  156. #define ABS_ALWAYSONTOP 0x0000002
  157.  
  158. #define ABE_LEFT        0
  159. #define ABE_TOP         1
  160. #define ABE_RIGHT       2
  161. #define ABE_BOTTOM      3
  162.  
  163. typedef struct _AppBarData
  164. {
  165.     DWORD cbSize;
  166.     HWND hWnd;
  167.     UINT uCallbackMessage;
  168.     UINT uEdge;
  169.     RECT rc;
  170.     LPARAM lParam; // message specific
  171. } APPBARDATA, *PAPPBARDATA;
  172.  
  173. WINSHELLAPI UINT APIENTRY SHAppBarMessage(DWORD dwMessage, PAPPBARDATA pData);
  174.  
  175. ////
  176. ////  EndAppBar
  177. ////
  178.  
  179.  
  180. WINSHELLAPI DWORD   APIENTRY DoEnvironmentSubstA(LPSTR szString, UINT cbString);
  181. WINSHELLAPI DWORD   APIENTRY DoEnvironmentSubstW(LPWSTR szString, UINT cbString);
  182. #ifdef UNICODE
  183. #define DoEnvironmentSubst  DoEnvironmentSubstW
  184. #else
  185. #define DoEnvironmentSubst  DoEnvironmentSubstA
  186. #endif // !UNICODE
  187. WINSHELLAPI LPSTR APIENTRY FindEnvironmentStringA(LPSTR szEnvVar);
  188. WINSHELLAPI LPWSTR APIENTRY FindEnvironmentStringW(LPWSTR szEnvVar);
  189. #ifdef UNICODE
  190. #define FindEnvironmentString  FindEnvironmentStringW
  191. #else
  192. #define FindEnvironmentString  FindEnvironmentStringA
  193. #endif // !UNICODE
  194.  
  195. #define EIRESID(x) (-1 * (int)(x))
  196. WINSHELLAPI UINT WINAPI ExtractIconExA(LPCSTR lpszFile, int nIconIndex, HICON FAR *phiconLarge, HICON FAR *phiconSmall, UINT nIcons);
  197. WINSHELLAPI UINT WINAPI ExtractIconExW(LPCWSTR lpszFile, int nIconIndex, HICON FAR *phiconLarge, HICON FAR *phiconSmall, UINT nIcons);
  198. #ifdef UNICODE
  199. #define ExtractIconEx  ExtractIconExW
  200. #else
  201. #define ExtractIconEx  ExtractIconExA
  202. #endif // !UNICODE
  203.  
  204.  
  205.  
  206. ////
  207. //// Shell File Operations
  208. ////
  209.  
  210. #ifndef FO_MOVE //these need to be kept in sync with the ones in shlobj.h
  211.  
  212. #define FO_MOVE           0x0001
  213. #define FO_COPY           0x0002
  214. #define FO_DELETE         0x0003
  215. #define FO_RENAME         0x0004
  216.  
  217. #define FOF_MULTIDESTFILES         0x0001
  218. #define FOF_CONFIRMMOUSE           0x0002
  219. #define FOF_SILENT                 0x0004  // don't create progress/report
  220. #define FOF_RENAMEONCOLLISION      0x0008
  221. #define FOF_NOCONFIRMATION         0x0010  // Don't prompt the user.
  222. #define FOF_WANTMAPPINGHANDLE      0x0020  // Fill in SHFILEOPSTRUCT.hNameMappings
  223.                                       // Must be freed using SHFreeNameMappings
  224. #define FOF_ALLOWUNDO              0x0040
  225. #define FOF_FILESONLY              0x0080  // on *.*, do only files
  226. #define FOF_SIMPLEPROGRESS         0x0100  // means don't show names of files
  227. #define FOF_NOCONFIRMMKDIR         0x0200  // don't confirm making any needed dirs
  228. #define FOF_NOERRORUI              0x0400  // don't put up error UI
  229. #define FOF_NOCOPYSECURITYATTRIBS  0x0800  // dont copy NT file Security Attributes
  230.  
  231. typedef WORD FILEOP_FLAGS;
  232.  
  233. #define PO_DELETE       0x0013  // printer is being deleted
  234. #define PO_RENAME       0x0014  // printer is being renamed
  235. #define PO_PORTCHANGE   0x0020  // port this printer connected to is being changed
  236.                                 // if this id is set, the strings received by
  237.                                 // the copyhook are a doubly-null terminated
  238.                                 // list of strings.  The first is the printer
  239.                                 // name and the second is the printer port.
  240. #define PO_REN_PORT     0x0034  // PO_RENAME and PO_PORTCHANGE at same time.
  241.  
  242. // no POF_ flags currently defined
  243.  
  244. typedef WORD PRINTEROP_FLAGS;
  245.  
  246. #endif // FO_MOVE
  247.  
  248. // implicit parameters are:
  249. //      if pFrom or pTo are unqualified names the current directories are
  250. //      taken from the global current drive/directory settings managed
  251. //      by Get/SetCurrentDrive/Directory
  252. //
  253. //      the global confirmation settings
  254.  
  255. typedef struct _SHFILEOPSTRUCTA
  256. {
  257.         HWND            hwnd;
  258.         UINT            wFunc;
  259.         LPCSTR          pFrom;
  260.         LPCSTR          pTo;
  261.         FILEOP_FLAGS    fFlags;
  262.         BOOL            fAnyOperationsAborted;
  263.         LPVOID          hNameMappings;
  264.         LPCSTR           lpszProgressTitle; // only used if FOF_SIMPLEPROGRESS
  265. } SHFILEOPSTRUCTA, FAR *LPSHFILEOPSTRUCTA;
  266. typedef struct _SHFILEOPSTRUCTW
  267. {
  268.         HWND            hwnd;
  269.         UINT            wFunc;
  270.         LPCWSTR         pFrom;
  271.         LPCWSTR         pTo;
  272.         FILEOP_FLAGS    fFlags;
  273.         BOOL            fAnyOperationsAborted;
  274.         LPVOID          hNameMappings;
  275.         LPCWSTR          lpszProgressTitle; // only used if FOF_SIMPLEPROGRESS
  276. } SHFILEOPSTRUCTW, FAR *LPSHFILEOPSTRUCTW;
  277. #ifdef UNICODE
  278. typedef SHFILEOPSTRUCTW SHFILEOPSTRUCT;
  279. typedef LPSHFILEOPSTRUCTW LPSHFILEOPSTRUCT;
  280. #else
  281. typedef SHFILEOPSTRUCTA SHFILEOPSTRUCT;
  282. typedef LPSHFILEOPSTRUCTA LPSHFILEOPSTRUCT;
  283. #endif // UNICODE
  284.  
  285. WINSHELLAPI int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp);
  286. WINSHELLAPI int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp);
  287. #ifdef UNICODE
  288. #define SHFileOperation  SHFileOperationW
  289. #else
  290. #define SHFileOperation  SHFileOperationA
  291. #endif // !UNICODE
  292.  
  293. WINSHELLAPI void WINAPI SHFreeNameMappings(HANDLE hNameMappings);
  294.  
  295. typedef struct _SHNAMEMAPPINGA
  296. {
  297.     LPSTR   pszOldPath;
  298.     LPSTR   pszNewPath;
  299.     int   cchOldPath;
  300.     int   cchNewPath;
  301. } SHNAMEMAPPINGA, FAR *LPSHNAMEMAPPINGA;
  302. typedef struct _SHNAMEMAPPINGW
  303. {
  304.     LPWSTR  pszOldPath;
  305.     LPWSTR  pszNewPath;
  306.     int   cchOldPath;
  307.     int   cchNewPath;
  308. } SHNAMEMAPPINGW, FAR *LPSHNAMEMAPPINGW;
  309. #ifdef UNICODE
  310. typedef SHNAMEMAPPINGW SHNAMEMAPPING;
  311. typedef LPSHNAMEMAPPINGW LPSHNAMEMAPPING;
  312. #else
  313. typedef SHNAMEMAPPINGA SHNAMEMAPPING;
  314. typedef LPSHNAMEMAPPINGA LPSHNAMEMAPPING;
  315. #endif // UNICODE
  316.  
  317.  
  318. ////
  319. //// End Shell File Operations
  320. ////
  321.  
  322. ////
  323. ////  Begin ShellExecuteEx and family
  324. ////
  325.  
  326.  
  327. /* ShellExecute() and ShellExecuteEx() error codes */
  328.  
  329. /* regular WinExec() codes */
  330. #define SE_ERR_FNF              2       // file not found
  331. #define SE_ERR_PNF              3       // path not found
  332. #define SE_ERR_ACCESSDENIED     5       // access denied
  333. #define SE_ERR_OOM              8       // out of memory
  334. #define SE_ERR_DLLNOTFOUND              32
  335.  
  336. #endif /* WINVER >= 0x0400 */
  337.  
  338. /* error values for ShellExecute() beyond the regular WinExec() codes */
  339. #define SE_ERR_SHARE                    26
  340. #define SE_ERR_ASSOCINCOMPLETE          27
  341. #define SE_ERR_DDETIMEOUT               28
  342. #define SE_ERR_DDEFAIL                  29
  343. #define SE_ERR_DDEBUSY                  30
  344. #define SE_ERR_NOASSOC                  31
  345.  
  346. #if(WINVER >= 0x0400)
  347.  
  348. // Note CLASSKEY overrides CLASSNAME
  349. #define SEE_MASK_CLASSNAME        0x00000001
  350. #define SEE_MASK_CLASSKEY         0x00000003
  351. // Note INVOKEIDLIST overrides IDLIST
  352. #define SEE_MASK_IDLIST           0x00000004
  353. #define SEE_MASK_INVOKEIDLIST     0x0000000c
  354. #define SEE_MASK_ICON             0x00000010
  355. #define SEE_MASK_HOTKEY           0x00000020
  356. #define SEE_MASK_NOCLOSEPROCESS   0x00000040
  357. #define SEE_MASK_CONNECTNETDRV    0x00000080
  358. #define SEE_MASK_FLAG_DDEWAIT     0x00000100
  359. #define SEE_MASK_DOENVSUBST       0x00000200
  360. #define SEE_MASK_FLAG_NO_UI       0x00000400
  361. #define SEE_MASK_UNICODE          0x00004000
  362. #define SEE_MASK_NO_CONSOLE       0x00008000
  363. #define SEE_MASK_ASYNCOK          0x00100000
  364. #define SEE_MASK_HMONITOR         0x00200000
  365. typedef struct _SHELLEXECUTEINFOA
  366. {
  367.         DWORD cbSize;
  368.         ULONG fMask;
  369.         HWND hwnd;
  370.         LPCSTR   lpVerb;
  371.         LPCSTR   lpFile;
  372.         LPCSTR   lpParameters;
  373.         LPCSTR   lpDirectory;
  374.         int nShow;
  375.         HINSTANCE hInstApp;
  376.         // Optional fields
  377.         LPVOID lpIDList;
  378.         LPCSTR   lpClass;
  379.         HKEY hkeyClass;
  380.         DWORD dwHotKey;
  381.         union {
  382.         HANDLE hIcon;
  383.         HANDLE hMonitor;
  384.         };
  385.         HANDLE hProcess;
  386. } SHELLEXECUTEINFOA, FAR *LPSHELLEXECUTEINFOA;
  387. // Note CLASSKEY overrides CLASSNAME
  388. #define SEE_MASK_CLASSNAME        0x00000001
  389. #define SEE_MASK_CLASSKEY         0x00000003
  390. // Note INVOKEIDLIST overrides IDLIST
  391. #define SEE_MASK_IDLIST           0x00000004
  392. #define SEE_MASK_INVOKEIDLIST     0x0000000c
  393. #define SEE_MASK_ICON             0x00000010
  394. #define SEE_MASK_HOTKEY           0x00000020
  395. #define SEE_MASK_NOCLOSEPROCESS   0x00000040
  396. #define SEE_MASK_CONNECTNETDRV    0x00000080
  397. #define SEE_MASK_FLAG_DDEWAIT     0x00000100
  398. #define SEE_MASK_DOENVSUBST       0x00000200
  399. #define SEE_MASK_FLAG_NO_UI       0x00000400
  400. #define SEE_MASK_UNICODE          0x00004000
  401. #define SEE_MASK_NO_CONSOLE       0x00008000
  402. #define SEE_MASK_ASYNCOK          0x00100000
  403. #define SEE_MASK_HMONITOR         0x00200000
  404. typedef struct _SHELLEXECUTEINFOW
  405. {
  406.         DWORD cbSize;
  407.         ULONG fMask;
  408.         HWND hwnd;
  409.         LPCWSTR  lpVerb;
  410.         LPCWSTR  lpFile;
  411.         LPCWSTR  lpParameters;
  412.         LPCWSTR  lpDirectory;
  413.         int nShow;
  414.         HINSTANCE hInstApp;
  415.         // Optional fields
  416.         LPVOID lpIDList;
  417.         LPCWSTR  lpClass;
  418.         HKEY hkeyClass;
  419.         DWORD dwHotKey;
  420.         union {
  421.         HANDLE hIcon;
  422.         HANDLE hMonitor;
  423.         };
  424.         HANDLE hProcess;
  425. } SHELLEXECUTEINFOW, FAR *LPSHELLEXECUTEINFOW;
  426. #ifdef UNICODE
  427. typedef SHELLEXECUTEINFOW SHELLEXECUTEINFO;
  428. typedef LPSHELLEXECUTEINFOW LPSHELLEXECUTEINFO;
  429. #else
  430. typedef SHELLEXECUTEINFOA SHELLEXECUTEINFO;
  431. typedef LPSHELLEXECUTEINFOA LPSHELLEXECUTEINFO;
  432. #endif // UNICODE
  433.  
  434. WINSHELLAPI BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
  435. WINSHELLAPI BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
  436. #ifdef UNICODE
  437. #define ShellExecuteEx  ShellExecuteExW
  438. #else
  439. #define ShellExecuteEx  ShellExecuteExA
  440. #endif // !UNICODE
  441. WINSHELLAPI void WINAPI WinExecErrorA(HWND hwnd, int error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
  442. WINSHELLAPI void WINAPI WinExecErrorW(HWND hwnd, int error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
  443. #ifdef UNICODE
  444. #define WinExecError  WinExecErrorW
  445. #else
  446. #define WinExecError  WinExecErrorA
  447. #endif // !UNICODE
  448.  
  449. ////
  450. ////  End ShellExecuteEx and family
  451. ////
  452.  
  453. //
  454. // RecycleBin
  455. //
  456.  
  457.  
  458. // struct for query recycle bin info
  459. typedef struct _SHQUERYRBINFO {
  460.     DWORD   cbSize;
  461. #if !defined(_MAC) || defined(_MAC_INT_64)
  462.     __int64 i64Size;
  463.     __int64 i64NumItems;
  464. #else
  465.     DWORDLONG i64Size;
  466.     DWORDLONG i64NumItems;
  467. #endif
  468. } SHQUERYRBINFO, FAR *LPSHQUERYRBINFO;
  469.  
  470.  
  471. // flags for SHEmptyRecycleBin
  472. //
  473. #define SHERB_NOCONFIRMATION    0x00000001
  474. #define SHERB_NOPROGRESSUI      0x00000002
  475. #define SHERB_NOSOUND           0x00000004
  476.  
  477.  
  478. SHSTDAPI SHQueryRecycleBinA(LPCSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo );
  479. SHSTDAPI SHQueryRecycleBinW(LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo );
  480. #ifdef UNICODE
  481. #define SHQueryRecycleBin  SHQueryRecycleBinW
  482. #else
  483. #define SHQueryRecycleBin  SHQueryRecycleBinA
  484. #endif // !UNICODE
  485. SHSTDAPI SHEmptyRecycleBinA(HWND hwnd, LPCSTR pszRootPath, DWORD dwFlags );
  486. SHSTDAPI SHEmptyRecycleBinW(HWND hwnd, LPCWSTR pszRootPath, DWORD dwFlags );
  487. #ifdef UNICODE
  488. #define SHEmptyRecycleBin  SHEmptyRecycleBinW
  489. #else
  490. #define SHEmptyRecycleBin  SHEmptyRecycleBinA
  491. #endif // !UNICODE
  492.  
  493. ////
  494. //// end of RecycleBin
  495.  
  496.  
  497. ////
  498. //// Tray notification definitions
  499. ////
  500.  
  501. typedef struct _NOTIFYICONDATAA {
  502.         DWORD cbSize;
  503.         HWND hWnd;
  504.         UINT uID;
  505.         UINT uFlags;
  506.         UINT uCallbackMessage;
  507.         HICON hIcon;
  508.         CHAR   szTip[64];
  509. } NOTIFYICONDATAA, *PNOTIFYICONDATAA;
  510. typedef struct _NOTIFYICONDATAW {
  511.         DWORD cbSize;
  512.         HWND hWnd;
  513.         UINT uID;
  514.         UINT uFlags;
  515.         UINT uCallbackMessage;
  516.         HICON hIcon;
  517.         WCHAR  szTip[64];
  518. } NOTIFYICONDATAW, *PNOTIFYICONDATAW;
  519. #ifdef UNICODE
  520. typedef NOTIFYICONDATAW NOTIFYICONDATA;
  521. typedef PNOTIFYICONDATAW PNOTIFYICONDATA;
  522. #else
  523. typedef NOTIFYICONDATAA NOTIFYICONDATA;
  524. typedef PNOTIFYICONDATAA PNOTIFYICONDATA;
  525. #endif // UNICODE
  526.  
  527.  
  528. #define NIM_ADD         0x00000000
  529. #define NIM_MODIFY      0x00000001
  530. #define NIM_DELETE      0x00000002
  531.  
  532. #define NIF_MESSAGE     0x00000001
  533. #define NIF_ICON        0x00000002
  534. #define NIF_TIP         0x00000004
  535.  
  536. WINSHELLAPI BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA lpData);
  537. WINSHELLAPI BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData);
  538. #ifdef UNICODE
  539. #define Shell_NotifyIcon  Shell_NotifyIconW
  540. #else
  541. #define Shell_NotifyIcon  Shell_NotifyIconA
  542. #endif // !UNICODE
  543.  
  544. ////
  545. //// End Tray Notification Icons
  546. ////
  547.  
  548.  
  549.  
  550. ////
  551. //// Begin SHGetFileInfo
  552. ////
  553.  
  554. /*
  555.  * The SHGetFileInfo API provides an easy way to get attributes
  556.  * for a file given a pathname.
  557.  *
  558.  *   PARAMETERS
  559.  *
  560.  *     pszPath              file name to get info about
  561.  *     dwFileAttributes     file attribs, only used with SHGFI_USEFILEATTRIBUTES
  562.  *     psfi                 place to return file info
  563.  *     cbFileInfo           size of structure
  564.  *     uFlags               flags
  565.  *
  566.  *   RETURN
  567.  *     TRUE if things worked
  568.  */
  569.  
  570. typedef struct _SHFILEINFOA
  571. {
  572.         HICON       hIcon;                      // out: icon
  573.         int         iIcon;                      // out: icon index
  574.         DWORD       dwAttributes;               // out: SFGAO_ flags
  575.         CHAR        szDisplayName[MAX_PATH];    // out: display name (or path)
  576.         CHAR        szTypeName[80];             // out: type name
  577. } SHFILEINFOA;
  578. typedef struct _SHFILEINFOW
  579. {
  580.         HICON       hIcon;                      // out: icon
  581.         int         iIcon;                      // out: icon index
  582.         DWORD       dwAttributes;               // out: SFGAO_ flags
  583.         WCHAR       szDisplayName[MAX_PATH];    // out: display name (or path)
  584.         WCHAR       szTypeName[80];             // out: type name
  585. } SHFILEINFOW;
  586. #ifdef UNICODE
  587. typedef SHFILEINFOW SHFILEINFO;
  588. #else
  589. typedef SHFILEINFOA SHFILEINFO;
  590. #endif // UNICODE
  591.  
  592. #define SHGFI_ICON              0x000000100     // get icon
  593. #define SHGFI_DISPLAYNAME       0x000000200     // get display name
  594. #define SHGFI_TYPENAME          0x000000400     // get type name
  595. #define SHGFI_ATTRIBUTES        0x000000800     // get attributes
  596. #define SHGFI_ICONLOCATION      0x000001000     // get icon location
  597. #define SHGFI_EXETYPE           0x000002000     // return exe type
  598. #define SHGFI_SYSICONINDEX      0x000004000     // get system icon index
  599. #define SHGFI_LINKOVERLAY       0x000008000     // put a link overlay on icon
  600. #define SHGFI_SELECTED          0x000010000     // show icon in selected state
  601. #define SHGFI_ATTR_SPECIFIED    0x000020000     // get only specified attributes
  602. #define SHGFI_LARGEICON         0x000000000     // get large icon
  603. #define SHGFI_SMALLICON         0x000000001     // get small icon
  604. #define SHGFI_OPENICON          0x000000002     // get open icon
  605. #define SHGFI_SHELLICONSIZE     0x000000004     // get shell size icon
  606. #define SHGFI_PIDL              0x000000008     // pszPath is a pidl
  607. #define SHGFI_USEFILEATTRIBUTES 0x000000010     // use passed dwFileAttribute
  608.  
  609. SHSTDAPI_(DWORD) SHGetFileInfoA(LPCSTR pszPath, DWORD dwFileAttributes, SHFILEINFOA FAR *psfi, UINT cbFileInfo, UINT uFlags);
  610. SHSTDAPI_(DWORD) SHGetFileInfoW(LPCWSTR pszPath, DWORD dwFileAttributes, SHFILEINFOW FAR *psfi, UINT cbFileInfo, UINT uFlags);
  611. #ifdef UNICODE
  612. #define SHGetFileInfo  SHGetFileInfoW
  613. #else
  614. #define SHGetFileInfo  SHGetFileInfoA
  615. #endif // !UNICODE
  616. SHSTDAPI_(BOOL)  SHGetDiskFreeSpaceA(LPCSTR pszVolume, ULARGE_INTEGER *pqwFreeCaller, ULARGE_INTEGER *pqwTot, ULARGE_INTEGER *pqwFree);
  617. SHSTDAPI_(BOOL)  SHGetDiskFreeSpaceW(LPCWSTR pszVolume, ULARGE_INTEGER *pqwFreeCaller, ULARGE_INTEGER *pqwTot, ULARGE_INTEGER *pqwFree);
  618. #ifdef UNICODE
  619. #define SHGetDiskFreeSpace  SHGetDiskFreeSpaceW
  620. #else
  621. #define SHGetDiskFreeSpace  SHGetDiskFreeSpaceA
  622. #endif // !UNICODE
  623. SHSTDAPI_(BOOL)  SHGetNewLinkInfoA(LPCSTR pszLinkTo, LPCSTR pszDir, LPSTR pszName, BOOL *pfMustCopy, UINT uFlags);
  624. SHSTDAPI_(BOOL)  SHGetNewLinkInfoW(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName, BOOL *pfMustCopy, UINT uFlags);
  625. #ifdef UNICODE
  626. #define SHGetNewLinkInfo  SHGetNewLinkInfoW
  627. #else
  628. #define SHGetNewLinkInfo  SHGetNewLinkInfoA
  629. #endif // !UNICODE
  630.  
  631. #define SHGNLI_PIDL             0x000000001     // pszLinkTo is a pidl
  632. #define SHGNLI_PREFIXNAME       0x000000002     // Make name "Shortcut to xxx"
  633. #define SHGNLI_NOUNIQUE         0x000000004     // don't do the unique name generation
  634.  
  635.  
  636. ////
  637. //// End SHGetFileInfo
  638. ////
  639.  
  640. // Printer stuff
  641. #define PRINTACTION_OPEN           0
  642. #define PRINTACTION_PROPERTIES     1
  643. #define PRINTACTION_NETINSTALL     2
  644. #define PRINTACTION_NETINSTALLLINK 3
  645. #define PRINTACTION_TESTPAGE       4
  646. #define PRINTACTION_OPENNETPRN     5
  647. #ifdef WINNT
  648. #define PRINTACTION_DOCUMENTDEFAULTS 6
  649. #define PRINTACTION_SERVERPROPERTIES 7
  650. #endif
  651.  
  652. SHSTDAPI_(BOOL)  SHInvokePrinterCommandA(HWND hwnd, UINT uAction, LPCSTR lpBuf1, LPCSTR lpBuf2, BOOL fModal);
  653. SHSTDAPI_(BOOL)  SHInvokePrinterCommandW(HWND hwnd, UINT uAction, LPCWSTR lpBuf1, LPCWSTR lpBuf2, BOOL fModal);
  654. #ifdef UNICODE
  655. #define SHInvokePrinterCommand  SHInvokePrinterCommandW
  656. #else
  657. #define SHInvokePrinterCommand  SHInvokePrinterCommandA
  658. #endif // !UNICODE
  659.  
  660.  
  661.  
  662. #endif /* WINVER >= 0x0400 */
  663.  
  664.  
  665. #ifdef __cplusplus
  666. }
  667. #endif  /* __cplusplus */
  668.  
  669. #include <poppack.h>
  670.  
  671. #pragma option pop
  672. #endif  /* _INC_SHELLAPI */
  673.